﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using DreamCube.Foundation.Serialization;
using DreamCube.Foundation.Basic.Utility;

namespace Test
{
    class testJSON
    {
        public static void Start()
        {
            Child c = new Child { ChildName = "child" };
            Parent p = new Parent
            {
                ChildList = new Child[] { c },
                ParentName = "parent"
            };
            Console.WriteLine(MyJson.Serialize(p));
        }


        public class Child
        {
            public String ChildName
            {
                get;
                set;
            }
        }

        public class Parent
        {
            private Child[] childList = null;

            public Child[] ChildList
            {
                get { return childList; }
                set { childList = value; }
            }

            public String ParentName
            {
                get;
                set;
            }
        }
    }
}
